import { lazy } from "react";
import {ROUTERTYPE,HOMETYPE} from "../types/router.d"
import { FriendsO, HomeO, AppsO, CartO } from '@react-vant/icons';
export const homePath:HOMETYPE[]=[
    {
        path:"/home/index",
        component:lazy(()=>import("../views/home/index/Index")),
        title:"首页",
        icon:HomeO
    },
    {
        path:"/home/classify",
        component:lazy(()=>import("../views/home/classify/Classify")),
        title:"分类",
        icon:AppsO
    },
    {
        path:"/home/shopcar",
        component:lazy(()=>import("../views/home/shopcar/Shopcar")),
        title:"购物车",
        icon:CartO
    },
    {
        path:"/home/my",
        component:lazy(()=>import("../views/home/my/My")),
        title:"我的",
        icon:FriendsO
    },
]
const routes:ROUTERTYPE[]=[
{
    path:"/home",
    component:lazy(()=>import("../views/home/Home")),
    children:homePath,
},
{
    path:"/login",
    component:lazy(()=>import("../views/login/Login"))
},
{
    path:"/detail/:id",
    component:lazy(()=>import("../views/detail/Detail"))
},
{
    path:"/",
    to:"/home/index"
},

];
export default routes;